package com.szholly.pro.watergas_server.ps.android.controller;

import javax.servlet.ServletContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.ServletContextAware;

import com.szholly.pro.watergas_server.ps.android.service.SurfaceService;

/**
 * 供水接口控制器
 * 
 * 1.getRuntimeData 获取实时数据
 * 
 * 2.getHistoryDataInitData 获取历史数据初始化
 *  
 * @author joey
 *
 */
@Controller
@RequestMapping("/android/supply/*")
public class AndroidSupplyController implements ServletContextAware {
	private ServletContext servletContext;
	@Autowired
	AndroidSupplyManager mSupplyService;
	@Override
	public void setServletContext(ServletContext arg0) {
		// TODO Auto-generated method stub
		this.servletContext = servletContext;
	}
	@RequestMapping("/getSupplydomainByID")
	@ResponseBody
	public String getdomainByID(String S_DOMAINNAME){
		return  mSupplyService.getdomainByID(S_DOMAINNAME);
		
	}
	@RequestMapping("/getSupplyLocationParamData")
	@ResponseBody
	public String getSupplyLocationParamData(){
		return  mSupplyService.getSupplyLocationParamData();
		
	}	
	@RequestMapping("/getSupplyAbnormalReason")
	@ResponseBody
	public String getSupplyAbnormalReason(){
		return  mSupplyService.getSupplyAbnormalReason();	
	}	
}
